<extend name="Public/layout"/>
<block name="head">
      <link rel="stylesheet" href="__PUBLIC__css/my_circle.css">
      <script src="__PUBLIC__js/report.js"></script>
<style type="text/css">
.footer{
    display: none;
}
</style>
</block>
<block name="main">

    <div class="circle_list swiper-container">
      <div class="swiper-wrapper">

        <foreach name="plat" item="v">
            <div class="swiper-slide">
                <a href="/Home/Person/my_circle/id/{$v.id}">
                    <div class="circle_logo"><img src="{$v.wx_square_logo}" width="100%" height="100%"></div>
                    <span>{$v.name}</span>
                </a>
            </div>
        </foreach>

      </div>
    </div>


    <div class="info_title">{$plat_name.name}圈子动态</div>
    <div class="inveset-com">
      <ul>
        <if condition="$push_evaluate">
            <foreach name="push_evaluate" item="v">
              <if condition="$v[type] eq 1">
                  <li>
                    <a href="javascript:;">
                          <div class="item-top">
                              <div class="item-right">
                                <img src="{$v.user.url_img}">
                                <div class="user">
                                  <h4>{$v.user.nickname}</h4>
                                  <if condition="$v[user][role] eq 2"><img src="__PUBLIC__images/ad-star.png"><else/></if>
                                  <!-- <p><if condition="$v[grade][is_invest] eq 1">已投<else/>未投</if></p> -->
                                </div>
                                <div class="comment">
                                   <ul>
                                      <foreach name="v.tag" item="vv">
										  <if condition="$vv">
												<li>
												  <span>{$vv}</span>
												</li>
											</if>
                                      </foreach>
                                  </ul>
                                </div>
                              </div>
                              <span class="report" onclick="report(1,'{$v[id]}','{$id}')">举报</span>
    <!--                           <div class="top-btn">
                              <p><if condition="$v[grade][colligate] eq 1">放心投<elseif condition="$v[grade][colligate] eq 2"/>可以投<elseif condition="$v[grade][colligate] eq 3"/>谨慎投<elseif condition="$v[grade][colligate] eq 4"/>不要投</if></p>
                              </div> -->
                                                <switch name="v.grade.colligate" >
                                                <case value="1" break="1">
                                                    <div class="top-btn btn-sug">
                                                    </div>
                                                </case>
                                                <case value="2">
                                                    <div class="top-btn btn-set">
                                                    </div>
                                                 </case>
                                                <case value="3">
                                                   <div class="top-btn btn-pru">
                                                    </div>
                                                 </case>
                                                <case value="4">
                                                   <div class="top-btn btn-no">
                                                    </div>
                                                </case>
                                                </switch>
                         </div>
                          <div class="item-bottom" onclick="location.href='/Home/Circle/commentary_info/id/{$v.id}/platform_id/{$id}'">
                            <p>{$v.evaluate}</p>
                          </div>

                           <div class="info_bottom">
                          <div class="item-time">
                            <p>{$v.add_date}</p>
                          </div>
                          <div class="item-left">
                                        <if condition="$v.is_praise eq 0">
                                          <div class="item-no" onclick="praise(this,6,{$v.id})">
                                            <img src="__PUBLIC__images/comment-no.png" height="26" width="28">
                                        <else/>
                                          <div class="item-good"  onclick="praise(this,6,{$v.id})">
                                            <img src="__PUBLIC__images/comment-good.png" height="26" width="28">
                                        </if>
                                        <span>{$v.praise}</span>
                                    </div>
                            <div class="item-com" onclick="location.href='/Home/Circle/commentary_info/id/{$v.id}/platform_id/{$id}'">
                              <img src="__PUBLIC__images/comment.png" height="25" width="28">
                              <span>{$v.comment}</span>
                            </div>
                          </div>
                          </div>
                       </a>
                  </li>
              <elseif condition="$v[type] eq 2"/>
                  <li>
                    <a href="javascript:;">
                          <div class="item-top">
                              <div class="item-right">
                                <img src="{$v.user.url_img}">
                                <div class="user">
                                  <h4>{$v.user.nickname}</h4>
                                  <img src="__PUBLIC__images/ad-star.png">
                                  <!-- <p><if condition="$v[grade][is_invest] eq 1">已投<else/>未投</if></p> -->
                                </div>
                                <div class="comment">
                                   <ul>
                                      <li>
                                        <span class="deep-test">深度评测</span>
                                      </li>
                                    </ul>
                                </div>
                              </div>
                              <span class="report_stag" onclick="report(2,'{$v[id]}','{$id}')">举报</span>
                                                <switch name="v.grade.colligate" >
                                                <case value="1" break="1">
                                                    <div class="top-btn btn-sug">
                                                    </div>
                                                </case>
                                                <case value="2">
                                                    <div class="top-btn btn-set">
                                                    </div>
                                                 </case>
                                                <case value="3">
                                                   <div class="top-btn btn-pru">
                                                    </div>
                                                 </case>
                                                <case value="4">
                                                   <div class="top-btn btn-no">
                                                    </div>
                                                </case>
                                                </switch>
                         </div>
                          <div class="item-bottom" onclick="location.href='/Home/Circle/depth_info/id/{$v.id}/platform_id/{$id}'">
                            <p>{$v.strength}</p>
                          </div>
                        
                        <div class="info_bottom">
                          <div class="item-time">
                            <p>{$v.add_date}</p>
                          </div>
                          <div class="item-left">
                                        <if condition="$v.is_praise eq 0">
                                          <div class="item-no" onclick="praise(this,7,{$v.id})">
                                            <img src="__PUBLIC__images/comment-no.png" height="26" width="28">
                                        <else/>
                                          <div class="item-good"  onclick="praise(this,7,{$v.id})">
                                            <img src="__PUBLIC__images/comment-good.png" height="26" width="28">
                                        </if>
                                        <span>{$v.praise}</span>
                          </div>
                            <div class="item-com" onclick="location.href='/Home/Circle/depth_info/id/{$v.id}/platform_id/{$id}'">
                              <img src="__PUBLIC__images/comment.png" height="25" width="28">
                              <span>{$v.comment}</span>
                            </div>
                          </div>
                      </div>

                       </a>
                  </li>
              <elseif condition="$v[type] eq 3"/>
                   <li>
                    <a href="javascript:;">
                          <div class="item-top">
                              <div class="item-right">
                                <img src="{$v.user.url_img}">
                                <div class="user">
                                  <h4>{$v.user.nickname}</h4>
                                  <img src="__PUBLIC__images/ad-star.png">
                                  <!-- <p><if condition="$v[grade][is_invest] eq 1">已投<else/>未投</if></p> -->
                                </div>
                                <div class="comment">
                                   <ul>
                                      <li>
                                        <span class="letter-cloak">信披解读</span>
                                      </li>
                                    </ul>
                                </div>
                              </div>
                              <span class="report_stag" onclick="report(3,'{$v[id]}','{$id}')">举报</span>
                                                <switch name="v.grade.colligate" >
                                                <case value="1" break="1">
                                                    <div class="top-btn btn-sug">
                                                    </div>
                                                </case>
                                                <case value="2">
                                                    <div class="top-btn btn-set">
                                                    </div>
                                                 </case>
                                                <case value="3">
                                                   <div class="top-btn btn-pru">
                                                    </div>
                                                 </case>
                                                <case value="4">
                                                   <div class="top-btn btn-no">
                                                    </div>
                                                </case>
                                                </switch>
                         </div>
                          <div class="item-bottom" onclick="location.href='/Home/Circle/infoann_info/id/{$v.id}/platform_id/{$id}'">
                            <p>{$v.announce}</p>
                          </div>
                           <div class="info_bottom">

                          <div class="item-time">
                            <p>{$v.add_date}</p>
                          </div>
                          <div class="item-left">
                                         <if condition="$v.is_praise eq 0">
                                          <div class="item-no" onclick="praise(this,9,{$v.id})">
                                            <img src="__PUBLIC__images/comment-no.png" height="26" width="28">
                                        <else/>
                                          <div class="item-good"  onclick="praise(this,9,{$v.id})">
                                            <img src="__PUBLIC__images/comment-good.png" height="26" width="28">
                                        </if>
                                        <span>{$v.praise}</span>
                                      </div>
                             <div class="item-com" onclick="location.href='/Home/Circle/infoann_info/id/{$v.id}/platform_id/{$id}'">
                              <img src="__PUBLIC__images/comment.png" height="25" width="28">
                              <span>{$v.comment}</span>
                            </div> 
                            <!--  <a href="/Home/Circle/circle_opinion_info/id/{$v.id}/platform_id/{$_GET['id']}" class="item-com">
                                <img src="__PUBLIC__images/comment.png" height="25" width="28">
                                <span>{$v.comment}</span>
                              </a>-->
                          </div>
                        </div>
                       </a>
                  </li>
              <elseif condition="$v[type] eq 4"/>
                  <li>
                    <a href="javascript:;">
                          <div class="item-top">
                              <div class="item-right">
                                <img src="{$v.user.url_img}">
                                <div class="user">
                                  <h4>{$v.user.nickname}</h4>
                                  <img src="__PUBLIC__images/ad-star.png">
                                  <!-- <p><if condition="$v[grade][is_invest] eq 1">已投<else/>未投</if></p> -->
                                </div>
                                <div class="comment">
                                   <ul>
                                      <li>
                                        <span class="public-sent">舆情评测</span>
                                      </li>
                                    </ul>
                                </div>
                              </div>
                              <span class="report_stag" onclick="report(4,'{$v[id]}','{$id}')">举报</span>
                                                <switch name="v.grade.colligate" >
                                                <case value="1" break="1">
                                                    <div class="top-btn btn-sug">
                                                    </div>
                                                </case>
                                                <case value="2">
                                                    <div class="top-btn btn-set">
                                                    </div>
                                                 </case>
                                                <case value="3">
                                                   <div class="top-btn btn-pru">
                                                    </div>
                                                 </case>
                                                <case value="4">
                                                   <div class="top-btn btn-no">
                                                    </div>
                                                </case>
                                                </switch>
                         </div>
                         <div class="opinion-item">
                          <a href="javascript:;">
                         <!--    <div class="opinion-img">
                              <img src="__PUBLIC__images/opinion.png" height="120" width="120">
                            </div> -->
                            <div class="opinion-content">
                              <h4>舆情标题:{:msubstr($v[title],0,23)}</h4>
                              <a  href="{$v.url}">舆情链接:{:msubstr($v[url],0,40)}</a>
                              <!-- <p>{$v.source}</p> -->
                            </div>
                          </a>
                        </div>
                          <div class="item-bottom" onclick="location.href='/Home/Circle/circle_opinion_info/id/{$v.id}/platform_id/{$id}'">
                            <p>{$v.content}</p>
                          </div>
                           <div class="info_bottom">
                          <div class="item-time">
                            <p>{$v.add_date}</p>
                          </div>
                          <div class="item-left">
                              <if condition="$v.is_praise eq 0">
                                <div class="item-no" onclick="praise(this,8,{$v.id})">
                                  <img src="__PUBLIC__images/comment-no.png" height="26" width="28">
                              <else/>
                                <div class="item-good"  onclick="praise(this,8,{$v.id})">
                                  <img src="__PUBLIC__images/comment-good.png" height="26" width="28">
                              </if>
                                <span>{$v.praise}</span>
                              </div>
                            <div class="item-com" onclick="location.href='/Home/Circle/circle_opinion_info/id/{$v.id}/platform_id/{$id}'">
                              <img src="__PUBLIC__images/comment.png" height="25" width="28">
                              <span>{$v.comment}</span>
                            </div>
                          </div>
                        </div>
                       </a>
                  </li>
                </if>
              </foreach>
          <else/>
            <div class="inveset-img"><img src="__PUBLIC__images/no-shuju.png"><p>暂无数据...</p></div></li>
          </if>
      </ul>
    </div>
</block>
<block name="js">
  <script src="__PUBLIC__js/report.js"></script>
  <script type="text/javascript">

      function praise(obj,type,id){
        var userid = "{$_SESSION['user']['id']}"
         if(!userid){
            layer.open({
                    content: '请先登录！'
                    , skin: 'msg'
                    , time: 1
                    , end: function () {
                        location.href = "/Home/User/login?callback=/Home/Person/my_circle/id/{$_GET['id']}"
                    }
                });
        }
        if(type==6){
         var postdata = {commentid:id,id:id,type:type}
        }else if(type==7){
          var postdata = {depthid:id,id:id,type:type,}
        }else if(type==8){
          var postdata = {opinionid:id,id:id,type:type,}
        }else if(type==9){
          var postdata = {announceid:id,id:id,type:type,}
        }

         $.post('/Home/Praise/ajax_praise',postdata,function(res){
            if(res.err==0){
              $(obj).removeClass('item-no')
              $(obj).addClass('item-good')
              $(obj).find('img').attr('src','/App/Home/Public/images/comment-good.png')
              var num=parseInt($(obj).find('span').text())
              num = num+1
              $(obj).find('span').text(num)
            }else{
              layer.open({
                    content: res.msg
                    , skin: 'msg'
                    , time: 1
                    
              });
            }
          })
      }


    </script>
</block>